import request from '@/utils/request'

export const getDepartment = () => request.get('/company/department')
export const getDeparmentManager = () => request.get('/sys/user/simple')
export const addDepartment = (data) => request.post('/company/department', data)

// 获取部门详情
export function getDepartmentDetail(id) {
  return request({
    url: `/company/department/${id}`
  })
}
export const updateDepartment = (data) => request.put('/company/department/' + data.id, data)

// 封装一个删除接口

export const delDepartment = id => request.delete('/company/department/' + id)
